package com.itheima.mapper;

import com.github.pagehelper.Page;
import com.itheima.pojo.CheckGroup;
import com.itheima.pojo.CheckItem;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CheckGroupMapper {

    @Select("select * from t_checkgroup where id = #{id}")
    CheckGroup findById(Integer id);

    List<Integer> findCheckGroupIdsBySetmealId(Integer id);

    /**
     * 根据套餐id获取检查组id
     * @param id
     * @return
     */
    @Select("select * from t_setmeal_checkgroup where setmeal_id = #{id}")
    List<Integer> getCheckGroupsBySetmealId(Integer id);

    /**
     * 根据检查项id获取检查项
     * @param id
     * @return
     */
    @Select("select * from t_checkgroup where id = #{id}")
    CheckGroup getById(Integer id);
}
